<template>
	<view>
		<view class="bei">
			<image src="https://cwjt.oss-cn-beijing.aliyuncs.com/cwjt/535_1730961871999.png" mode=""></image>
		</view>
		<view class="ceshai">
			<view class="topstart">
			</view>
			<view class="header">
				<view class="hui" @click="member">
					<image src="../../static/zhengshu/jiantz.png" mode=""></image>
				</view>
				<view class="aa">
					我的推荐
				</view>
			</view>
			<view class="quanbu">
			</view>
		</view>
		<view class="erwei" v-if="ci.recInfo">
			<view class="imaf">
				<image :src="ci.recInfo.recQcCode" mode=""></image>
			</view>
			<view class="chengo">
				<view class="yao">
					已成功邀请
				</view>
				<view class="ren">
					{{ci.recCount}}人
				</view>
			</view>
		</view>
		<view class="ner">
			<view class="liyi" @click="memberb">
				<view class="liimg">
					<view class="imge">
						<image src="../../static/zhengshu/6532.png" mode=""></image>
					</view>
					<view class="imgtext">
						我的收益
					</view>
				</view>
				<view class="youbian">
					<image src="../../static/zhengshu/icon_back.png" mode=""></image>
				</view>
			</view>
			<view class="liyi" @click="withdraw">
				<view class="liimg">
					<view class="imge">
						<image src="../../static/zhengshu/6532.png" mode=""></image>
					</view>
					<view class="imgtext">
						提现记录
					</view>
				</view>
				<view class="youbian">
					<image src="../../static/zhengshu/icon_back.png" mode=""></image>
				</view>
			</view>
			<view class="liyi" @click="follow">
				<view class="liimg">
					<view class="imge">
						<image src="../../static/zhengshu/3195.png" mode=""></image>
					</view>
					<view class="imgtext">
						我的团队
					</view>
				</view>
				<view class="youbian">
					<image src="../../static/zhengshu/icon_back.png" mode=""></image>
				</view>
			</view>
			<view class="liyi" @click="memberc">
				<view class="liimg">
					<view class="imge">
						<image src="../../static/zhengshu/6531.png" mode=""></image>
					</view>
					<view class="imgtext">
						提现设置
					</view>
				</view>
				<view class="youbian">
					<image src="../../static/zhengshu/icon_back.png" mode=""></image>
				</view>
			</view>
		</view>

	</view>
</template>

<script>
	import {
		myRecommend,
		myRecommendCode
	} from '../../request/api.js'
	export default {
		data() {
			return {
				ye: {},
				detailsDatabaa: '',
				uid: 0,
				ci: {},

			}
		},
		onLoad() {

		},
		onShow() {
			this.uid = uni.getStorageSync('userInfo').id
			this.getIncrement()
			// this.getWxCode()
		},
		methods: {
			withdraw() {
				uni.navigateTo({
					url: '/pages/fengxag/withdraw'
				})
			},
			getIncrement() {
				myRecommendCode().then(res => {
					console.log(res, '我的推荐页面');
					this.ci = res.result
					this.ci.recInfo.recQcCode = 'data:image/png;base64,' + this.ci.recInfo.recQcCode
					this.ci.recInfo.recQcCode = this.ci.recInfo.recQcCode.replace(/[\r\n]/g, "");
				})
			},
			member() {
				uni.navigateBack({

				})
			},
			memberb() {
				uni.navigateTo({
					url: '/pages/fengxag/shouyi'
				})
			},
			memberc() {
				uni.navigateTo({
					url: '/pages/fengxag/tixian'
				})
			},
			follow() {
				uni.navigateTo({
					url: '/pages/fengxag/name'
				})
			},
		},
	}
</script>

<style scoped lang="less">
	.topstart {
		height: var(--status-bar-height);
	}

	.ceshai {

		// height: 375rpx;
		// background: linear-gradient(22deg, #FAFAFA 0%, #FBE6E2 100%);
	}

	.header {
		margin-top: 65rpx;
		// text-align: center;
		color: #170000;
		font-size: 36rpx;
		display: flex;
		align-items: center;


		// margin-bottom: 0rpx;
		.hui {
			width: 36rpx;
			height: 36rpx;
			margin-right: 240rpx;
			margin-left: 30rpx;

			image {
				width: 36rpx;
				height: 36rpx;
			}
		}



	}

	.bei {
		width: 100vw;
		height: 100vh;
		position: absolute;
		top: 0;
		left: 0;
		z-index: -99;

		image {
			width: 100vw;
			height: 100vh;
		}
	}

	.erwei {
		width: 702rpx;
		height: 601rpx;
		background: linear-gradient(180deg, #FFF3F3 0%, #FFFFFF 100%);
		border-radius: 20rpx 20rpx 20rpx 20rpx;
		border: 4rpx solid #FFFFFF;
		margin: 0 auto;
		margin-top: 60rpx;
		padding: 0 24rpx;
		box-sizing: border-box;

		.imaf {
			margin: 0 auto;
			margin-top: 87rpx;
			width: 352rpx;
			height: 352rpx;
			margin-bottom: 70rpx;

			image {
				width: 352rpx;
				height: 352rpx;
			}
		}

		.chengo {
			display: flex;
			justify-content: space-between;

			font-weight: 400;
			font-size: 28rpx;
			color: #333333;

			font-style: normal;
			text-transform: none;
		}
	}

	.ner {
		width: 702rpx;
		margin: 0 auto;
		margin-top: 24rpx;
		background: #FFFFFF;
		border-radius: 20rpx 20rpx 20rpx 20rpx;
	}

	.liyi {
		display: flex;
		background: #FFFFFF;
		justify-content: space-between;
		align-items: center;
		height: 130rpx;
		padding: 0 27rpx;
		box-sizing: border-box;
		border-radius: 20rpx 20rpx 20rpx 20rpx;

		.liimg {
			display: flex;



			.imgtext {

				font-weight: 400;
				font-size: 28rpx;
				color: #333333;

				font-style: normal;
				text-transform: none;
				margin-left: 30rpx;
			}
		}

		.youbian {
			width: 11rpx;
			height: 20rpx;

			image {
				width: 11rpx;
				height: 20rpx;
			}
		}
	}

	.imge {
		width: 50rpx;
		height: 37.5rpx;

		image {
			width: 41rpx;
			height: 37.5rpx;
		}
	}
</style>